<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="orgpolicy_v2.html">Organization Policy API</a> . <a href="orgpolicy_v2.folders.html">folders</a> . <a href="orgpolicy_v2.folders.policies.html">policies</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Creates a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Google Cloud resource.</p>
<p class="toc_element">
  <code><a href="#delete">delete(name, etag=None, x__xgafv=None)</a></code></p>
<p class="firstline">Deletes a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or organization policy does not exist.</p>
<p class="toc_element">
  <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">Gets a policy on a resource. If no policy is set on the resource, `NOT_FOUND` is returned. The `etag` value can be used with `UpdatePolicy()` to update a policy during read-modify-write.</p>
<p class="toc_element">
  <code><a href="#getEffectivePolicy">getEffectivePolicy(name, x__xgafv=None)</a></code></p>
<p class="firstline">Gets the effective policy on a resource. This is the result of merging policies in the resource hierarchy and evaluating conditions. The returned policy will not have an `etag` or `condition` set because it is an evaluated policy across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.</p>
<p class="toc_element">
  <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Retrieves all of the policies that exist on a particular resource.</p>
<p class="toc_element">
  <code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
  <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
  <pre>Creates a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Google Cloud resource.

Args:
  parent: string, Required. The Google Cloud resource that will parent the new policy. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}` (required)
  body: object, The request body.
    The object takes the form of:

{ # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.
  &quot;alternate&quot;: { # Similar to PolicySpec but with an extra &#x27;launch&#x27; field for launch reference. The PolicySpec here is specific for dry-run. # Deprecated.
    &quot;launch&quot;: &quot;A String&quot;, # Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.
    &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Specify constraint for configurations of Google Cloud resources.
      &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
      &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
      &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
      &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
        { # A rule used to express this policy.
          &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
          &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
            &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
            &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
            &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
            &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
          },
          &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
          &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
          &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
            &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
          },
          &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
            &quot;allowedValues&quot;: [ # List of values allowed at this resource.
              &quot;A String&quot;,
            ],
            &quot;deniedValues&quot;: [ # List of values denied at this resource.
              &quot;A String&quot;,
            ],
          },
        },
      ],
      &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
    },
  },
  &quot;dryRunSpec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it&#x27;s enforced.
    &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
    &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
    &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
    &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
      { # A rule used to express this policy.
        &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
        &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
          &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
          &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
          &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
        },
        &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
        &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
        &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
          &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
        },
        &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
          &quot;allowedValues&quot;: [ # List of values allowed at this resource.
            &quot;A String&quot;,
          ],
          &quot;deniedValues&quot;: [ # List of values denied at this resource.
            &quot;A String&quot;,
          ],
        },
      },
    ],
    &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
  },
  &quot;etag&quot;: &quot;A String&quot;, # Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This &#x27;etag&#x27; is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
  &quot;name&quot;: &quot;A String&quot;, # Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
  &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Basic information about the organization policy.
    &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
    &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
    &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
    &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
      { # A rule used to express this policy.
        &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
        &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
          &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
          &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
          &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
        },
        &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
        &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
        &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
          &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
        },
        &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
          &quot;allowedValues&quot;: [ # List of values allowed at this resource.
            &quot;A String&quot;,
          ],
          &quot;deniedValues&quot;: [ # List of values denied at this resource.
            &quot;A String&quot;,
          ],
        },
      },
    ],
    &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.
  &quot;alternate&quot;: { # Similar to PolicySpec but with an extra &#x27;launch&#x27; field for launch reference. The PolicySpec here is specific for dry-run. # Deprecated.
    &quot;launch&quot;: &quot;A String&quot;, # Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.
    &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Specify constraint for configurations of Google Cloud resources.
      &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
      &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
      &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
      &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
        { # A rule used to express this policy.
          &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
          &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
            &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
            &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
            &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
            &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
          },
          &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
          &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
          &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
            &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
          },
          &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
            &quot;allowedValues&quot;: [ # List of values allowed at this resource.
              &quot;A String&quot;,
            ],
            &quot;deniedValues&quot;: [ # List of values denied at this resource.
              &quot;A String&quot;,
            ],
          },
        },
      ],
      &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
    },
  },
  &quot;dryRunSpec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it&#x27;s enforced.
    &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
    &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
    &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
    &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
      { # A rule used to express this policy.
        &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
        &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
          &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
          &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
          &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
        },
        &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
        &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
        &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
          &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
        },
        &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
          &quot;allowedValues&quot;: [ # List of values allowed at this resource.
            &quot;A String&quot;,
          ],
          &quot;deniedValues&quot;: [ # List of values denied at this resource.
            &quot;A String&quot;,
          ],
        },
      },
    ],
    &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
  },
  &quot;etag&quot;: &quot;A String&quot;, # Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This &#x27;etag&#x27; is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
  &quot;name&quot;: &quot;A String&quot;, # Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
  &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Basic information about the organization policy.
    &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
    &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
    &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
    &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
      { # A rule used to express this policy.
        &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
        &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
          &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
          &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
          &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
        },
        &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
        &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
        &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
          &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
        },
        &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
          &quot;allowedValues&quot;: [ # List of values allowed at this resource.
            &quot;A String&quot;,
          ],
          &quot;deniedValues&quot;: [ # List of values denied at this resource.
            &quot;A String&quot;,
          ],
        },
      },
    ],
    &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="delete">delete(name, etag=None, x__xgafv=None)</code>
  <pre>Deletes a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or organization policy does not exist.

Args:
  name: string, Required. Name of the policy to delete. See the policy entry for naming rules. (required)
  etag: string, Optional. The current etag of policy. If an etag is provided and does not match the current etag of the policy, deletion will be blocked and an ABORTED error will be returned.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}</pre>
</div>

<div class="method">
    <code class="details" id="get">get(name, x__xgafv=None)</code>
  <pre>Gets a policy on a resource. If no policy is set on the resource, `NOT_FOUND` is returned. The `etag` value can be used with `UpdatePolicy()` to update a policy during read-modify-write.

Args:
  name: string, Required. Resource name of the policy. See Policy for naming requirements. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.
  &quot;alternate&quot;: { # Similar to PolicySpec but with an extra &#x27;launch&#x27; field for launch reference. The PolicySpec here is specific for dry-run. # Deprecated.
    &quot;launch&quot;: &quot;A String&quot;, # Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.
    &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Specify constraint for configurations of Google Cloud resources.
      &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
      &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
      &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
      &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
        { # A rule used to express this policy.
          &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
          &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
            &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
            &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
            &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
            &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
          },
          &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
          &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
          &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
            &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
          },
          &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
            &quot;allowedValues&quot;: [ # List of values allowed at this resource.
              &quot;A String&quot;,
            ],
            &quot;deniedValues&quot;: [ # List of values denied at this resource.
              &quot;A String&quot;,
            ],
          },
        },
      ],
      &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
    },
  },
  &quot;dryRunSpec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it&#x27;s enforced.
    &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
    &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
    &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
    &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
      { # A rule used to express this policy.
        &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
        &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
          &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
          &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
          &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
        },
        &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
        &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
        &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
          &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
        },
        &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
          &quot;allowedValues&quot;: [ # List of values allowed at this resource.
            &quot;A String&quot;,
          ],
          &quot;deniedValues&quot;: [ # List of values denied at this resource.
            &quot;A String&quot;,
          ],
        },
      },
    ],
    &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
  },
  &quot;etag&quot;: &quot;A String&quot;, # Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This &#x27;etag&#x27; is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
  &quot;name&quot;: &quot;A String&quot;, # Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
  &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Basic information about the organization policy.
    &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
    &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
    &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
    &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
      { # A rule used to express this policy.
        &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
        &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
          &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
          &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
          &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
        },
        &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
        &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
        &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
          &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
        },
        &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
          &quot;allowedValues&quot;: [ # List of values allowed at this resource.
            &quot;A String&quot;,
          ],
          &quot;deniedValues&quot;: [ # List of values denied at this resource.
            &quot;A String&quot;,
          ],
        },
      },
    ],
    &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="getEffectivePolicy">getEffectivePolicy(name, x__xgafv=None)</code>
  <pre>Gets the effective policy on a resource. This is the result of merging policies in the resource hierarchy and evaluating conditions. The returned policy will not have an `etag` or `condition` set because it is an evaluated policy across multiple resources. Subtrees of Resource Manager resource hierarchy with &#x27;under:&#x27; prefix will not be expanded.

Args:
  name: string, Required. The effective policy to compute. See Policy for naming requirements. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.
  &quot;alternate&quot;: { # Similar to PolicySpec but with an extra &#x27;launch&#x27; field for launch reference. The PolicySpec here is specific for dry-run. # Deprecated.
    &quot;launch&quot;: &quot;A String&quot;, # Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.
    &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Specify constraint for configurations of Google Cloud resources.
      &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
      &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
      &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
      &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
        { # A rule used to express this policy.
          &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
          &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
            &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
            &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
            &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
            &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
          },
          &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
          &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
          &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
            &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
          },
          &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
            &quot;allowedValues&quot;: [ # List of values allowed at this resource.
              &quot;A String&quot;,
            ],
            &quot;deniedValues&quot;: [ # List of values denied at this resource.
              &quot;A String&quot;,
            ],
          },
        },
      ],
      &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
    },
  },
  &quot;dryRunSpec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it&#x27;s enforced.
    &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
    &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
    &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
    &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
      { # A rule used to express this policy.
        &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
        &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
          &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
          &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
          &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
        },
        &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
        &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
        &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
          &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
        },
        &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
          &quot;allowedValues&quot;: [ # List of values allowed at this resource.
            &quot;A String&quot;,
          ],
          &quot;deniedValues&quot;: [ # List of values denied at this resource.
            &quot;A String&quot;,
          ],
        },
      },
    ],
    &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
  },
  &quot;etag&quot;: &quot;A String&quot;, # Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This &#x27;etag&#x27; is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
  &quot;name&quot;: &quot;A String&quot;, # Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
  &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Basic information about the organization policy.
    &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
    &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
    &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
    &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
      { # A rule used to express this policy.
        &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
        &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
          &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
          &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
          &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
        },
        &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
        &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
        &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
          &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
        },
        &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
          &quot;allowedValues&quot;: [ # List of values allowed at this resource.
            &quot;A String&quot;,
          ],
          &quot;deniedValues&quot;: [ # List of values denied at this resource.
            &quot;A String&quot;,
          ],
        },
      },
    ],
    &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
  <pre>Retrieves all of the policies that exist on a particular resource.

Args:
  parent: string, Required. The target Google Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}` (required)
  pageSize: integer, Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.
  pageToken: string, Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response returned from the ListPolicies method. It will be empty if no policies are set on the resource.
  &quot;nextPageToken&quot;: &quot;A String&quot;, # Page token used to retrieve the next page. This is currently not used, but the server may at any point start supplying a valid token.
  &quot;policies&quot;: [ # All policies that exist on the resource. It will be empty if no policies are set.
    { # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.
      &quot;alternate&quot;: { # Similar to PolicySpec but with an extra &#x27;launch&#x27; field for launch reference. The PolicySpec here is specific for dry-run. # Deprecated.
        &quot;launch&quot;: &quot;A String&quot;, # Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.
        &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Specify constraint for configurations of Google Cloud resources.
          &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
          &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
          &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
          &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
            { # A rule used to express this policy.
              &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
              &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
                &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
                &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
                &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
                &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
              },
              &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
              &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
              &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
                &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
              },
              &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
                &quot;allowedValues&quot;: [ # List of values allowed at this resource.
                  &quot;A String&quot;,
                ],
                &quot;deniedValues&quot;: [ # List of values denied at this resource.
                  &quot;A String&quot;,
                ],
              },
            },
          ],
          &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
        },
      },
      &quot;dryRunSpec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it&#x27;s enforced.
        &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
        &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
        &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
        &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
          { # A rule used to express this policy.
            &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
            &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
              &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
              &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
              &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
              &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
            },
            &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
            &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
            &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
              &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
            },
            &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
              &quot;allowedValues&quot;: [ # List of values allowed at this resource.
                &quot;A String&quot;,
              ],
              &quot;deniedValues&quot;: [ # List of values denied at this resource.
                &quot;A String&quot;,
              ],
            },
          },
        ],
        &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
      },
      &quot;etag&quot;: &quot;A String&quot;, # Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This &#x27;etag&#x27; is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
      &quot;name&quot;: &quot;A String&quot;, # Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
      &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Basic information about the organization policy.
        &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
        &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
        &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
        &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
          { # A rule used to express this policy.
            &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
            &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
              &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
              &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
              &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
              &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
            },
            &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
            &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
            &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
              &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
            },
            &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
              &quot;allowedValues&quot;: [ # List of values allowed at this resource.
                &quot;A String&quot;,
              ],
              &quot;deniedValues&quot;: [ # List of values denied at this resource.
                &quot;A String&quot;,
              ],
            },
          },
        ],
        &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
      },
    },
  ],
}</pre>
</div>

<div class="method">
    <code class="details" id="list_next">list_next()</code>
  <pre>Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call &#x27;execute()&#x27; on to request the next
          page. Returns None if there are no more items in the collection.
        </pre>
</div>

<div class="method">
    <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
  <pre>Updates a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields.

Args:
  name: string, Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number. (required)
  body: object, The request body.
    The object takes the form of:

{ # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.
  &quot;alternate&quot;: { # Similar to PolicySpec but with an extra &#x27;launch&#x27; field for launch reference. The PolicySpec here is specific for dry-run. # Deprecated.
    &quot;launch&quot;: &quot;A String&quot;, # Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.
    &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Specify constraint for configurations of Google Cloud resources.
      &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
      &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
      &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
      &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
        { # A rule used to express this policy.
          &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
          &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
            &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
            &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
            &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
            &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
          },
          &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
          &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
          &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
            &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
          },
          &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
            &quot;allowedValues&quot;: [ # List of values allowed at this resource.
              &quot;A String&quot;,
            ],
            &quot;deniedValues&quot;: [ # List of values denied at this resource.
              &quot;A String&quot;,
            ],
          },
        },
      ],
      &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
    },
  },
  &quot;dryRunSpec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it&#x27;s enforced.
    &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
    &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
    &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
    &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
      { # A rule used to express this policy.
        &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
        &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
          &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
          &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
          &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
        },
        &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
        &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
        &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
          &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
        },
        &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
          &quot;allowedValues&quot;: [ # List of values allowed at this resource.
            &quot;A String&quot;,
          ],
          &quot;deniedValues&quot;: [ # List of values denied at this resource.
            &quot;A String&quot;,
          ],
        },
      },
    ],
    &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
  },
  &quot;etag&quot;: &quot;A String&quot;, # Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This &#x27;etag&#x27; is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
  &quot;name&quot;: &quot;A String&quot;, # Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
  &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Basic information about the organization policy.
    &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
    &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
    &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
    &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
      { # A rule used to express this policy.
        &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
        &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
          &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
          &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
          &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
        },
        &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
        &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
        &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
          &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
        },
        &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
          &quot;allowedValues&quot;: [ # List of values allowed at this resource.
            &quot;A String&quot;,
          ],
          &quot;deniedValues&quot;: [ # List of values denied at this resource.
            &quot;A String&quot;,
          ],
        },
      },
    ],
    &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
  },
}

  updateMask: string, Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.
  &quot;alternate&quot;: { # Similar to PolicySpec but with an extra &#x27;launch&#x27; field for launch reference. The PolicySpec here is specific for dry-run. # Deprecated.
    &quot;launch&quot;: &quot;A String&quot;, # Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.
    &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Specify constraint for configurations of Google Cloud resources.
      &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
      &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
      &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
      &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
        { # A rule used to express this policy.
          &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
          &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
            &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
            &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
            &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
            &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
          },
          &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
          &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
          &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
            &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
          },
          &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
            &quot;allowedValues&quot;: [ # List of values allowed at this resource.
              &quot;A String&quot;,
            ],
            &quot;deniedValues&quot;: [ # List of values denied at this resource.
              &quot;A String&quot;,
            ],
          },
        },
      ],
      &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
    },
  },
  &quot;dryRunSpec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it&#x27;s enforced.
    &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
    &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
    &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
    &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
      { # A rule used to express this policy.
        &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
        &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
          &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
          &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
          &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
        },
        &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
        &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
        &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
          &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
        },
        &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
          &quot;allowedValues&quot;: [ # List of values allowed at this resource.
            &quot;A String&quot;,
          ],
          &quot;deniedValues&quot;: [ # List of values denied at this resource.
            &quot;A String&quot;,
          ],
        },
      },
    ],
    &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
  },
  &quot;etag&quot;: &quot;A String&quot;, # Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This &#x27;etag&#x27; is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
  &quot;name&quot;: &quot;A String&quot;, # Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
  &quot;spec&quot;: { # Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. # Basic information about the organization policy.
    &quot;etag&quot;: &quot;A String&quot;, # An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.
    &quot;inheritFromParent&quot;: True or False, # Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.
    &quot;reset&quot;: True or False, # Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
    &quot;rules&quot;: [ # In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.
      { # A rule used to express this policy.
        &quot;allowAll&quot;: True or False, # Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.
        &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: &quot;Summary size limit&quot; description: &quot;Determines if a summary is less than 100 chars&quot; expression: &quot;document.summary.size() &lt; 100&quot; Example (Equality): title: &quot;Requestor is owner&quot; description: &quot;Determines if requestor is the document owner&quot; expression: &quot;document.owner == request.auth.claims.email&quot; Example (Logic): title: &quot;Public documents&quot; description: &quot;Determine whether the document should be publicly visible&quot; expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot; Example (Data Manipulation): title: &quot;Notification string&quot; description: &quot;Create a notification string with a timestamp.&quot; expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot; The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. # A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr&#x27; must include from 1 to 10 subexpressions, joined by the &quot;||&quot; or &quot;&amp;&amp;&quot; operators. Each subexpression must be of the form &quot;resource.matchTag(&#x27;/tag_key_short_name, &#x27;tag_value_short_name&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/key_id&#x27;, &#x27;tagValues/value_id&#x27;)&quot;. where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: &quot;resource.matchTag(&#x27;123456789/environment, &#x27;prod&#x27;)&quot;. or &quot;resource.matchTagId(&#x27;tagKeys/123&#x27;, &#x27;tagValues/456&#x27;)&quot;.
          &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
          &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax.
          &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
          &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
        },
        &quot;denyAll&quot;: True or False, # Setting this to true means that all values are denied. This field can be set only in policies for list constraints.
        &quot;enforce&quot;: True or False, # If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set in policies for boolean constraints, custom constraints and managed constraints.
        &quot;parameters&quot;: { # Optional. Required for managed constraints if parameters are defined. Passes parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: ``` { &quot;allowedLocations&quot; : [&quot;us-east1&quot;, &quot;us-west1&quot;], &quot;allowAll&quot; : true } ```
          &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
        },
        &quot;values&quot;: { # A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a &quot;:&quot;. Values prefixed with &quot;is:&quot; are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used. # List of values to be used for this policy rule. This field can be set only in policies for list constraints.
          &quot;allowedValues&quot;: [ # List of values allowed at this resource.
            &quot;A String&quot;,
          ],
          &quot;deniedValues&quot;: [ # List of values denied at this resource.
            &quot;A String&quot;,
          ],
        },
      },
    ],
    &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.
  },
}</pre>
</div>

</body></html>